<!-- 首页 -->
<template>
	<view class="container">
		<view class="c-info">
			<TeacherModule :info="teacherInfo"></TeacherModule>
		</view>
		<view class="m-btn">
			<view class="btn-block">
				<u-button type="primary" text="修改" @click="navigateTo('teacherEditInfo?type=update')" shape="circle">
				</u-button>
			</view>
			<view class="btn-block">
				<u-button text="返回" type="success" @click="navigateBack" shape="circle"></u-button>
			</view>
		</view>
	</view>
	</view>
</template>

<script>
	import TeacherModule from "@/pages/pages_mine/components/TeacherModule.vue"
	export default {
		name: "",
		components: {
			TeacherModule
		},
		data() {
			return {
				// 老师信息
				teacherInfo: {}
			}
		},
		onLoad() {
			this.getTeacherInfo()
		},
		methods: {
			// 获取老师信息
			getTeacherInfo(id) {
				this.$http.getTeacherInfo().then(res => {
					this.teacherInfo = res
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.container {
		.m-btn {
			padding: 0 30rpx;
			box-sizing: border-box;
			width: 100%;
			display: flex;
			justify-content: space-around;

			.btn-block {
				width: 40%;
			}
		}
	}
</style>
